/**Variable**/

/*筛选*/
.vxe-filter-wrapper {
  padding: 0 0.1em 0 0.25em;
  text-align: center;
  vertical-align: middle;
  display: inline-block;
  line-height: 0;
  &.is--active {
    .vxe-filter--btn {
      color: $vxe-font-color;
    }
  }
  .vxe-filter--btn {
    color: $vxe-table-column-icon-border-color;
    cursor: pointer;
    &:hover {
      color: $vxe-font-color;
    }
  }
}
.filter--active {
  .vxe-filter-wrapper {
    .vxe-filter--btn {
      color: $vxe-primary-color;
    }
  }
}

/*筛选容器*/
.vxe-table--filter-wrapper {
  display: none;
  position: absolute;
  min-width: 100px;
  border-radius: 2px;
  background-color: #fff;
  border: 1px solid $vxe-table-popup-border-color;
  box-shadow: 3px 3px 4px -2px rgba(0, 0, 0, 0.6);
  z-index: 10;
  &:not(.is--multiple) {
    text-align: center;
  }
  &.filter--active {
    display: block;
  }
  .vxe-table--filter-header,
  .vxe-table--filter-body {
    & > li {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 360px;
      padding: 0.25em 0.8em;
      cursor: pointer;
      &.is--checked {
        color: $vxe-primary-color;
      }
      &:hover {
        background-color: $vxe-table-row-hover-background-color;
      }
    }
  }
  .vxe-table--filter-header {
    padding-top: 0.2em;
  }
  .vxe-table--filter-body {
    max-height: 240px;
    padding-bottom: 0.2em;
  }
  .vxe-table--filter-template {
    padding: 0.8em
  }
  & > ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: auto;
    user-select: none;
  }
  &.is--multiple {
    & > ul {
      & > li {
        position: relative;
        padding: 0.25em 0.8em 0.25em 2.2em;
        &:before {
          content: "";
          position: absolute;
          height: 1.2em;
          width: 1.2em;
          top: 0.4em;
          left: 0.6em;
          border-radius: 0.2em;
          border: 2px solid $vxe-input-border-color;
        }
        &.is--checked,
        &.is--indeterminate {
          &:before {
            border-color: $vxe-primary-color;
            background-color: $vxe-primary-color;
          }
          &:after {
            content: "";
            position: absolute;
          }
        }
        &.is--checked {
          &:after {
            height: 0.7em;
            width: 0.34em;
            top: 0.6em;
            left: 1em;
            border: 2px solid #ffffff;
            border-left: 0;
            border-top: 0;
            transform: rotate(45deg);
          }
        }
        &.is--indeterminate {
          &:after {
            top: 0.9em;
            left: 0.65em;
            height: 0.18em;
            width: 1em;
            background-color: #ffffff;
            transform: scale(.6);
          }
        }
        &.is--disabled {
          cursor: not-allowed;
          color: $vxe-input-disabled-color;
          &.is--checked {
            &:before {
              border-color: $vxe-input-disabled-color;
              background-color: $vxe-input-disabled-background-color;
            }
            &:after {
              border-color: $vxe-input-disabled-color;
            }
          }
        }
      }
    }
  }
  .vxe-table--filter-footer {
    border-top: 1px solid $vxe-table-popup-border-color;
    padding: 0.6em;
    user-select: none;
    button {
      background-color: transparent;
      padding: 0 0.4em;
      border: 0;
      color: $vxe-font-color;
      cursor: pointer;
      &:focus {
        outline: none;
      }
      &:hover {
        color: $vxe-primary-color;
      }
      &.is--disabled {
        color: #c0c4cc;
        cursor: not-allowed;
      }
    }
  }
}